import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../../../utils/xh_styles.dart';
import '../../../utils/xin_he_image.dart';
import 'xin_he_place_order_success_logic.dart';

class XinHePlaceOrderSuccessPage extends StatelessWidget {
  XinHePlaceOrderSuccessPage({Key? key}) : super(key: key);

  final logic = Get.put(XinHePlaceOrderSuccessLogic());
  final state = Get.find<XinHePlaceOrderSuccessLogic>().state;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        leading: IconButton(
            onPressed: (){
              Get.back();
            },
            icon: Container(
              padding: const EdgeInsets.only(left: 7),
              alignment: Alignment.centerLeft,
              child: const XinHeAssetImage(
                'assets/images/home/app_back_3.png',
                width: 9.5,
                height: 17,
                fit: BoxFit.cover,),
            )
        ),
        backgroundColor: Colors.white,
        shadowColor: Colors.transparent,
        title: Text('下单成功',style: TextStyle(color:XinHeColor('##222222'),fontSize: 17,fontWeight: FontWeight.w600)),
        centerTitle: true,
      ),
      body: Column(children: [
        Expanded(child: ListView(
          children: [
            ///订单状态
            Container(
              decoration: BoxDecoration(color: Colors.white,borderRadius: BorderRadius.circular(7)),
              margin: const EdgeInsets.only(left: 15,right: 15,top: 15,bottom: 10),
              padding: const EdgeInsets.symmetric(horizontal: 15).copyWith(bottom: 15),
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [


                  Container(
                    alignment: Alignment.center,
                    height: 69,
                    child: Row(
                      mainAxisSize: MainAxisSize.min,
                      children: [
                      const XinHeAssetImage('assets/images/mine/success_s_25.png',width: 25,height: 25,),
                      const SizedBox(width: 10,),
                      Text('下单成功',style: TextStyle(color: XinHeStyle.mainBalckFontColor,fontWeight: FontWeight.w500,fontSize: 15),)
                    ],),),

                  // Container(height: 0.5,color: XinHeStyle.lineColor,width: Get.width-30,),
                 const SizedBox(height: 100,),

                  GestureDetector(
                    onTap:  () {
                      logic.toOrderDetail();
                    },
                    child: Container(
                      height: 44,
                      margin: EdgeInsets.symmetric(horizontal: 0),
                      alignment: Alignment.center,
                      decoration: BoxDecoration(
                        gradient: LinearGradient(colors: [ XinHeColor('##F89A30'), XinHeColor('#E84128')]),
                        borderRadius: BorderRadius.circular(22),
                      ),
                      child: const Text('订单详情',style: TextStyle(color: Colors.white,fontSize: 16),strutStyle: StrutStyle(forceStrutHeight: true),),
                    ),
                  ),



                ],),
            ),








          ],)
        ),

      ],),
    );
  }
}
